package com.keyancompany.zhongbaopingtai.weight;

import android.content.Context;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.keyancompany.zhongbaopingtai.R;
import com.keyancompany.zhongbaopingtai.adapter.TeamAdapter;
import com.keyancompany.zhongbaopingtai.utils.DensityUtils;
import com.keyancompany.zhongbaopingtai.utils.ScreenUtils;
import com.keyancompany.zhongbaopingtai.utils.T;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by firefox on 2016/6/16.
 */
public class SelectTeamPopup extends MenuPopuWindow {

    @Bind(R.id.team_select_left)
    ListView teamSelectLeft;
    @Bind(R.id.team_select_right)
    ListView teamSelectRight;
    @Bind(R.id.select_sure)
    TextView sure;

    TeamAdapter teamAdapter;

    public SelectTeamPopup(Context context) {
        super(context);
    }

    @Override
    public void setUpViews() {

//        teamSelectLeft = (NoScorllerListView) findViewById(R.id.team_select_left);
//        teamSelectRight = (NoScorllerListView) findViewById(R.id.team_select_right);
        teamAdapter = new TeamAdapter(context);
        teamSelectLeft.setAdapter(teamAdapter);
        teamSelectRight.setAdapter(teamAdapter);
    }

    @Override
    public void setUpListener() {


    }

    @OnClick(R.id.select_sure)
    public void clickSure(View view) {
        T.showShort(context, "确认");
        dismiss();
        if (cliclSureListener != null)
            cliclSureListener.clickSureLinstener(new String[]{});
    }

    @Override
    public int getAnimationStyle() {
        return 0;
    }

    @Override
    public int getResView() {
        return R.layout.popup_team_select;
    }

    @Override
    public void updateView(View contentView) {
        setWidth(ScreenUtils.getScreenWidth(context) * 4 / 5);
        setHeight(ScreenUtils.getScreenHeight(context) * 2 / 3);
    }
}
